package com.apimarket.util.kong;

import com.apimarket.entity.kong.Route;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;
//这个类主要提出kong中对route操作的一些url
public abstract class KongRoute extends KongBase {
    protected static final String addPath = "/routes";

    public static final String listPath = "/routes";

    protected static final String listViaServicePath = "/services";

    protected static final String updatePath = "/routes";

    protected static final String deletePath = "/routes";

    public KongRoute() {
    }

    public KongRoute(String baseUrl) {
        super(baseUrl);
    }

    public abstract Route addRoute(Route route) throws IOException, URISyntaxException;

    public abstract Route addRouteAndJudege(Route route) throws IOException, URISyntaxException;

    public abstract List<Route> listAllRoutes() throws IOException, URISyntaxException;

    public abstract List<Route> listRoutesViaService(String serviceId) throws IOException, URISyntaxException;

    public abstract Route updateRoute(Route route) throws IOException, URISyntaxException;

    public abstract Route updateRouteAndJudege(Route route,String operationType) throws IOException, URISyntaxException;

    public abstract void deleteRoute(String nameOrId) throws IOException, URISyntaxException;

    public abstract Route getRouteById(String id) throws IOException,URISyntaxException;
}
